const express = require('express');
var commentController = require('../controller/comment.controller');

module.exports = (app)=>{
    var router = express.Router();

    router.route('/')
        .post(commentController.addComment);

    router.route('/getByMerchantId/:merchantId')
        .get(commentController.findByMerchantId);

    router.route('/getByOrderId/:orderId')
        .get(commentController.findByOrderId);

    app.use('/comments',router);

    return router;
}